﻿<script type="text/javascript">
//FormEdit.debug = true;
FormEdit.formName = "form1";
FormEdit.postUrl = "./admin_arttemplate.asp";
FormEdit.dateVal = "action=add";
if (typeof(tabFormID[currentTab]) != "undefined")
{
	FormEdit.dateVal += "&ID=" + tabFormID[currentTab];

	objForm.doResponseMethod = getEditPostResult;
	editSuccessUrl = './templates/admin_arttemplate_list.htm';

	setTabTitle(currentTab, tabTitle[122]);
}
else{
	objForm.doResponseMethod = getAddPostResult;

	setTabTitle(currentTab, tabTitle[121]);
}
FormEdit.doResponseMethodOther = "sw_help_topic_init()";

function initTabContent(){
	FormEdit.start();

	tinyMCE.init({
		mode : "exact",
		elements : "Content",
		language: "zh",
		skin : "o2k7",
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",
		width : 645,
		height : 410,

		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,forecolor,backcolor",
		theme_advanced_buttons2 : "undo,redo,|,link,image,tablecontrols,removeformat,cleanup,|,charmap,emotions,iespell,media,fullscreen,pagebreak",
		theme_advanced_buttons3 : "",
		theme : "advanced"
	});
}

function checkData(sTargetName) {
	$(sTargetName).value = getFekeditorText(sTargetName);

	objForm.doResponseOther = "switchTab(currentTab);";
	objForm.postUrl = "./admin_arttemplate.asp";
	objForm.ajaxPost();

	return false;
}

function getFekeditorText(editor_name)
{
	returnValue = tinyMCE.get(editor_name).getContent();

    return returnValue;
}
</script>

<form id="form1" name="form1" method="get" onsubmit="return false;">

<input type="hidden" name="" />
<input type="hidden" name="ID" />
<input type="hidden" name="action" value="save" />

<div class="mainWindows">
	<div>
		<fieldset><legend><span id="help_topic_icon" onclick="sw_help_topic();"><span id="Language_OperationNotice"></span></span></legend>
        <div id="help_topic"><span id="Language_ArticleTemplate_Help"></span></div>
        </fieldset>
	</div>

	<div style="margin-top: 5px;">
		<fieldset>
			<legend id="Language_ArticleTemplate_Input_Template"></legend>
			<table width="100%" class="edittable">
				<tr>
				  <td width="13%" align="center"><span id="Language_ArticleTemplate_TemplateName"></span></td>
				  <td align="left"><input type="text" name="title" dataType="Require" style="width: 250px;" /></td>
				</tr>
				<tr>
				  <td width="13%" align="center" valign="top"><span id="Language_ArticleTemplate_TemplateContent"></span></td>
				  <td align="left"><textarea name="Content" id="Content" dataType="Require"></textarea></td>
				</tr>
				<tr bgcolor="#efefef">
				  <td align="left" colspan="2">&nbsp;<input type="button" name="btnSubmit" id="btnSubmit" onclick="javascript:return checkData('Content');" />&nbsp;<input type="button" name="btnReturn" id="btnReturn" onclick="javascript:ajaxChangeRightContent('./templates/admin_arttemplate_list.htm','pageContent');" /></td>
				</tr>
			</table>
		</fieldset>
	</div>
</div>

</form>
